<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Hello Vue.js</title>
</head>
<body>
    <div id="app">
        <p>{{message}}</p>
        <input type="text" v-model="message">
    </div>
</body>
    <script src="https://unpkg.com/vue@next"></script>
    <script>
        const app = Vue.createApp({
           data() {
               return{
                   counter: 0 ,
                   message: 'Node.js !' ,
               }
           },
           methods: {
               btnClick(){
                   console.log(this.counter++,'-->',this)
               },
               btnClick1:() => {
                   console.log(this.counter++,'-->',this)
               }
            },
               template: `  <div> {{counter}} </div>
               <button @click="btnClick">按钮</button>      //v-on==@click
               <button @click="btnClick1">按钮1</button>
               `    
            })
    </script>
</html>